1. Field of the Invention
The present invention relates to a device control apparatus for varying the contents of sequence processing depending on a state of a device, a device control method, and a computer-readable recording medium recorded with a device control program.
2. Description of the Related Art
There is known a conventional method for device-embedded real time processing software architecture as disclosed, for example, in Japanese Unexamined Patent Publication No. 11-338684. FIG. 15 is an illustration showing the method of a conventional state transition operating system architecture recited in the publication. The state transition operating system shown in FIG. 15 comprises sequence components (internal state components) 301, and a connecting component (event input component) 302 for connecting the internal state components 301. Each of the internal state components 301 stores therein a sequence control program. When transition of the internal state of the device occurs, the sequence control program in the internal state component 301 is activated. In response to input of an event through external manipulation, the event input component 302 distributes the event to the internal state component 301 to thereby cause transition of the internal state of the device.
Generally, the conventional device-embedded control software, including the above example, constantly performs a predetermined cyclic processing to carry out overall control of the device while changing the state of the device by outputting a control signal based on a required timing, acquiring a signal indicative of a user's manipulation, or performing other necessary processing.
In the following, an architecture of the conventional device-embedded control software is described referring to FIG. 16. The control software shown in FIG. 16 has a loop architecture 211 for constantly executing a predetermined cyclic processing, wherein control signal output processing S201, S210, and a like step are executed for controlling a target object to be controlled (namely, a device). In addition to the control signal output processing, the loop architecture 211 has an internal state transition processing S202 and a like step to administer the current state of the device to be controlled. In addition to the control signal output processing and the internal state transition processing, the loop architecture 211 has a user input acquisition processing S203 and a like step for accepting input indicative of a user's manipulation. The user input acquisition processing is executed depending on the kind of the input. For example, there is a case that a control signal output processing S205 is executed, which is not executed normally, based on a judgment result of an input judgment processing S204. Further, there is a case that an internal state transition processing S208 is executed to make transition of the internal state, followed by a control signal output processing S209, which is not executed normally, depending on the kind of the input.
In the aforementioned control software, the internal state transition processing is not separated from the control signal output processing or a sequence control program for controlling the device. Therefore, in the case where it is necessary to alter the internal state transition processing due to change of the arrangement of the internal state, it is required to alter the signal output processing or the sequence control program as well, which makes it difficult to carry out software maintenance. Furthermore, since design of the internal state transition processing is constrained by the order of processing of the sequence control program, it is impossible for a designer to write the control program according to the designer's intension, thus obstructing free designing on the internal state of the device.